﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="addnewcars.aspx.vb" Inherits="felixfinalproject2.addnewcars" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 254px;
        }
     .style2
     {
         width: 488px;
     }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <br />
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        SelectCommand="SELECT * FROM [cars] WHERE ([AddedBy] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="AddedBy" QueryStringField="addedby" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
<table style="width:70%; height: 228px;" align="center" border="2px">
    <tr>
        <td class="style1">
            <asp:Label ID="Label1" runat="server" Text="Model Number:"></asp:Label>
        </td>
        <td class="style2">
            <asp:TextBox ID="txt_model" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label2" runat="server" Text="Production Year:"></asp:Label>
        </td>
        <td class="style2">
            <asp:TextBox ID="txt_productionyear" runat="server"></asp:TextBox>
            <asp:CalendarExtender ID="txt_productionyear_CalendarExtender" runat="server" 
                Enabled="True" TargetControlID="txt_productionyear">
            </asp:CalendarExtender>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label3" runat="server" Text="Body Type:"></asp:Label>
        </td>
        <td class="style2">
            <asp:DropDownList ID="dd_body_type" runat="server">
                <asp:ListItem>Coupe</asp:ListItem>
                <asp:ListItem>Saloon</asp:ListItem>
                <asp:ListItem>SUV</asp:ListItem>
                <asp:ListItem>Estates</asp:ListItem>
                <asp:ListItem>Cabriolets/Roadsters</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label4" runat="server" Text="Price"></asp:Label>
        </td>
        <td class="style2">
            <asp:DropDownList ID="dd_price1" runat="server">
                <asp:ListItem>$</asp:ListItem>
                <asp:ListItem>£</asp:ListItem>
                <asp:ListItem>₦</asp:ListItem>
                <asp:ListItem>R</asp:ListItem>
                <asp:ListItem>€</asp:ListItem>
                <asp:ListItem>YTL</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txt_price2" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator1" runat="server" 
                ControlToValidate="txt_price2" ErrorMessage="Be sure you input numbers!!" 
                MaximumValue="2000000000" MinimumValue="300" Type="Double"></asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label5" runat="server" Text="Notable Specifications:"></asp:Label>
        </td>
        <td class="style2">
            <asp:TextBox ID="txt_specification" runat="server" TextMode="MultiLine"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label6" runat="server" Text="Official Weblink:"></asp:Label>
        </td>
        <td class="style2">
            <asp:TextBox ID="txt_weblink" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txt_weblink" 
                ErrorMessage="Please check and be sure its a weblink" 
                ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label7" runat="server" Text="Upload Picture"></asp:Label>
        </td>
        <td class="style2">
            <asp:FileUpload ID="pic_upload" runat="server" />
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:Label ID="Label8" runat="server" Text="Uploader Rating:"></asp:Label>
        </td>
        <td class="style2">
            <asp:RadioButtonList ID="rbl_michelinstars" runat="server" 
                RepeatDirection="Horizontal">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
            </asp:RadioButtonList>
        </td>
    </tr>
</table>

<center><asp:Button ID="button_save" runat="server" Text="Save" Width="79px" 
        style="height: 26px" /></center>
<br />
<br />
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
<br />
<br />
<br />

</asp:Content>
